/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1616133711102_9428';

  // add your middleware config here
  config.middleware = ['cors']

  /* config.middleware = ["auth"];
  config.auth = {
    // 传递给中间件的option
    title:"中间件"
  } */

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };
  config.mongoose = {
    clients: {
      db1: {
        url: 'mongodb://127.0.0.1/blog',
        options: {},
        // client scope plugin array
        plugins: []
      },
      db2: {
        url: 'mongodb://127.0.0.1/blog2',
        options: {},
      },
      
    },
    // public scope plugin array
    plugins: []
  };

  config.security = {
    csrf: {
      enable: false
    }
  }
  config.jwt ={
    secret:"123456"
}

  config.view = {
    mapping: {
      '.html': 'arttemplate',
    },
  };

  return {
    ...config,
    ...userConfig,
  };
};
